package com.mdb.open.epay.service.epay;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mdb.bc.database.mybatisplus.SuperService;
import com.mdb.open.epay.common.MdbDataSource;
import com.mdb.open.epay.domain.po.epay.QpSignSerial;
import com.mdb.open.epay.mapper.epay.QpSignSerialMapper;
import org.springframework.stereotype.Service;

/**
 * 类描述：
 *  签约流水表 服务类
 *
 * @author liuyi
 * @date 2019-11-14
 */
@Service
@DS(MdbDataSource.EPAY)
public class QpSignSerialService extends SuperService<QpSignSerialMapper, QpSignSerial> {
    public boolean existed(String customerCode, String serialNo) {
        return 0 < this.count(new LambdaQueryWrapper<QpSignSerial>().eq(QpSignSerial::getCustomerCode, customerCode).eq(QpSignSerial::getMerchantOrderNo, serialNo));
    }
}
